from django.conf.urls import url

# rbac对用户，角色，权限，菜单进行管理
from Manager.views import channel, customerrulerel, macaddress, positionlimit, rule, dbinfo, \
    makemarketpara, cchannel_view, orderSearch, tradeSearch, positionSearch, selfTradeChannel,\
    accountmapping,caleandtime

urlpatterns = [

    # wn ==========================================================================
    # 实体账户-查询
    url(r'^channel_list', channel.channel_list, name='channel_list'),
    # 实体账户-增删改,创建(Create)、更新(Update)、读取(Retrieve)和删除(Delete)操作。
    url('^channel_cud', channel.channel_modify, name='channel_cud'),

    # 分账户列表
    url(r'^customer_channelist', cchannel_view.CChannelist, name='cchanneList'),
    url(r'^cchannel_modify', cchannel_view.cchannel_modify, name='cchannel_modify'),
    # 分账户根据channelid查询交易账号接口
    url(r'^cchannel_userid', cchannel_view.cchannel_userid, name="cchannel_userid"),

    # 策略配对-查询
    url(r'^customerrulerel_list', customerrulerel.customerrulerel_list, name='customerrulerel_list'),
    # 策略配对-增删改
    url(r'^customerrulerel_cud', customerrulerel.customerrulerel_modify, name='customerrulerel_cud'),

    # MAC地址白名单
    url(r'^macaddress_list', macaddress.macaddress_list, name='macaddress_list'),
    url(r'^macaddress_cud', macaddress.macaddress_modify, name='macaddress_cud'),

    # 策略限仓管理
    url(r'^positionlimit_list', positionlimit.positionlimit_list, name='positionlimit_list'),
    url(r'^positionlimit_cud', positionlimit.positionlimit_modify, name='positionlimit_cud'),

    # 用户策略管理
    url(r'^rule_list', rule.rule_list, name='rule_list'),
    url(r'^rule_cud', rule.rule_modify, name='rule_cud'),

    # 数据库信息维护
    url(r'^dbinfo_list', dbinfo.dbinfo_list, name='dbinfo_list'),
    url(r'^dbinfo_cud', dbinfo.dbinfo_modify, name='dbinfo_cud'),

    # 合约做市参数
    url(r'^makemarketpara_list', makemarketpara.makemarketpara_list, name='makemarketpara_list'),
    url(r'^makemarketpara_cud', makemarketpara.makemarketpara_modify, name='makemarketpara_cud'),

    # 查看做市状态
    url(r'^makemarketpara_status', makemarketpara.makemarketpara_status, name='makemarketpara_status'),

    # 报表查询###########
    # 报单查询
    url(r'^order_list', orderSearch.OrderSearch.as_view(), name='order_list'),
    url(r'^trade_list', tradeSearch.TradeSearch.as_view(), name='trade_list'),
    url(r'^position_list', positionSearch.PositionSearch.as_view(), name='position_list'),

    # 自成交配置管理
    url(r'^selftrade', selfTradeChannel.SelfTradeConfig.as_view(), name='selftrade'),
    # 持仓账户管理配置
    url(r'^accountmapping', accountmapping.AccountMapping.as_view(), name='accountmapping'),
    #后台系统自动启停管理
    url(r'^caleandtime/$',caleandtime.CaleAndTime.as_view(),name='caleandtime'),
    url(r'^caleandtime/input',caleandtime.CaleAndTimeInput,name='caleandtimeinput'),


]
